package com.qyhl.module_practice.activity.detail;


import com.qyhl.webtv.commonlib.entity.civilized.PracticeAcitivityBean;
import com.qyhl.webtv.commonlib.entity.civilized.PracticeIsVolunteerBean;

public class PracticeActDetailPresenter implements PracticeActDetailContract.PracticeActDetailPresenter {
    private PracticeActDetailActivity mView;
    private PracticeActDetailModel mModel;

    PracticeActDetailPresenter(PracticeActDetailActivity mView) {
        this.mView = mView;
        this.mModel = new PracticeActDetailModel(this);
    }


    @Override
    public void getDetail(String actId, String phone) {
        mModel.getDetail(actId, phone);
    }

    @Override
    public void doPraise(String actId, String phone) {
        mModel.doPraise(actId, phone);
    }

    @Override
    public void getIsVolunteer(String phone) {
        mModel.getIsVolunteer(phone);
    }

    @Override
    public void volunteerSign(String actId, String volId) {
        mModel.volunteerSign(actId, volId);
    }

    @Override
    public void setDetail(PracticeAcitivityBean bean) {
        mView.setDetail(bean);
    }

    @Override
    public void getDetailError(String msg) {
        mView.getDetailError(msg);
    }

    @Override
    public void praiseSuccess(int num) {
        mView.praiseSuccess(num);
    }

    @Override
    public void praiseError(String msg) {
        mView.praiseError(msg);
    }

    @Override
    public void setIsVolunteer(PracticeIsVolunteerBean bean) {
        mView.setIsVolunteer(bean);
    }

    @Override
    public void signResult(boolean isSuccess) {
        mView.signResult(isSuccess);
    }
}
